package com.xaaef.jvm;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * <p>
 * 局部变量表
 * </p>
 *
 * @author Wang Chen Chen<932560435@qq.com>
 * @date 2022/3/1 21:55
 */

public class LocalVariablesTableTest {

    public static void main(String[] args) {
        LocalVariablesTableTest test = new LocalVariablesTableTest();
        int num = 1;
        test.test2("yyyy-MM-dd");
    }

    public static void testStatic() {
        LocalVariablesTableTest test = new LocalVariablesTableTest();
        Date date = new Date();
        int count = 10;
        System.out.println(count);
    }

    public void test1() {
        System.out.println(LocalDate.now());
    }

    public void test2(String pattern) {
        System.out.println(LocalDate.now().format(DateTimeFormatter.ofPattern(pattern)));
    }

    public String test3(Date dataP, String name2) {
        dataP = null;
        name2 = "shen zhen";
        double weight = 130.5;
        char gender = '男';
        return dataP + name2;
    }


    public void test4() {
        int a = 0;
        {
            int b = 0;
            b = a + 1;
        }
        int c = a + 1;
    }

}
